import yagmail,logging,HTMLTestRunner_PY3


def log1():
    logging.basicConfig(level=logging.DEBUG,
                        format='%(levelname)s %(message)s %(asctime)s %(filename)s %(lineno)d',
                        filename='hj.log',
                        filemode='w+')
def log2():
    mail=yagmail.SMTP(user='3034738910@qq.com',password='aytttpqxjbbrddjh',host='smtp.qq.com')
    mail.send(to='3034738910@qq.com',subject='测试报告',contents='今日报告，请查收',attachments=['hj.log','hj.html'])
def Report():
    HTMLTestRunner_PY3.HTMLTestRunner(open('huj.html','wb'),
                                      title='萨达',
                                      description='测试报告')


